import request from "@/utils/request";

export function getArticleDetailAPI(id) {
  return request({
    url: "/getArticleDetail/" + id,
    method: "GET",
  });
}

export function getAuthorDetailAPI(id) {
  return request({
    url: "/getAuthorDetail/" + id,
    method: "GET",
  });
}

export function getArticleListAPI(data) {
  return request({
    url: "/getArticleList",
    method: "GET",
    params: data,
  });
}

export function getRandomArticleListAPI(num) {
  return request({
    url: "/getRandomArticleList/"+num,
    method: "GET",
  });
}


export function getCategoryDetailAPI(data){
  return request({
      url:'/getCategoryDetail',
      method:'GET',
      params:data
  })
}